<%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>

<%@ include file="console_element/top.jsp" %>
<div id="main">
    <%@ include file="console_element/left.jsp" %>
    <div id="opt_area">
        <script type="text/javascript">
            function clickdel(nid) {
                if (confirm("此新闻的相关评论也将删除，确定删除吗？"))
                    window.location = "<%=basePath%>news/delete?nid=" + nid;
            }
        </script>
        <ul class="classlist">
            <c:forEach items="${sessionScope.list}" var="news" varStatus="i">
                <li>${news.ntitle}<span> 作者：${news.nauthor} &#160;&#160;&#160;&#160;<a
                        href='<%=basePath%>news/modify?nid=${news.nid}'>修改</a> &#160;&#160;&#160;&#160;<a
                        href="javascript:" onclick='return clickdel(${news.nid})'>删除</a></span></li>
                <c:if test="${i.count % 5 == 0}">
                    <li class='space'></li>
                </c:if>
            </c:forEach>
            <c:remove var="list" scope="session"/>
        </ul>
    </div>
</div>

<%@ include file="console_element/bottom.html" %>

